package org.example.elasticsearch.query;


import org.example.elasticsearch.ESIndexEnum;

/**
 * @author: sql
 * @date: 2024/6/7
 * @Description: es测试启动
 * @version: 1.0
 */
public class EsMain {

    public static void main(String[] args) {
        ESQueryBuilder builder = ESQueryBuilder.of(ESIndexEnum.ES_TASK_INDEX_NAME)
                //多字段满足其一模糊
                .should(x -> x
                        .minShouldMatchAll()
                        .like("11", "taskName", "custTaskCode", "taskServerCode", "taskProxyCode")
                        //灵工 姓名/手机号
                        .like("22", "staffNameGroup", "mobileGroup")
                        .like("33", "staffNameGroup1", "mobileGroup1")
                )
                ;
        System.out.println(builder.build());
    }
}
